<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>登录便民购 || 农产品智能交易平台</title>
    <meta name="description" content="">
    <meta name="keywords" content="">
    <link rel="shortcut icon" href="/image/icon/litIcon.ico">
    <link href="/css/page.css" rel="stylesheet" type="text/css"/>
    <link href="/css/reset.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="/js/jquey-1.8.0.min.js"></script>
</head>

<body>
<div class="unLoginWrap">
    <!-- 登录导航条 -->
    <div class="register_wrap">
        <div class="register_content register_content2 clear">
            <div class="register_operate" id="__ddnav_menu">
                <p id="nickname">欢迎光临便民购，请
                    <a name="ddnav_login" href="/agricultural/login" target="_self" class="login_link">登录</a>
                    <a name="ddnav_register" href="/agricultural/register" target="_self" class="login_link">免费注册</a>
                </p>
            </div>
            <div class="register_logo"></div>
            <div class="banner clear">
                <div class="bannerHeader fr sprite"></div>
            </div>
        </div>
        <!--  <div class="registerhead_bottom"></div> -->
    </div>
    <!-- /登录导航条 -->
    <div id="login" class="clear">
        <!-- 登录框头部 -->
        <div class="head clear">
            <h3 class="fl">用户登陆入口</h3>
            <a tabindex="11" class="more" name="help" href="">忘记密码？</a>
            <p class="coupon_words">
                <label>登陆后，可以选商品实现购物！ </label>
            </p>
        </div>
        <!-- /登录框头部 -->

        <div class="loginFace fr">
            <div class="loginHeader clear">
                <h2>登陆便民购</h2>
                <span class="login_help fr">登陆帮助</span>
                <span class="metTra fr">遇到困难？</span>
            </div>

            <form id="submitData" action="" method="post" style="margin:20px 0">
                <div class="loginName">
                    <label for="username" class="login_name"><span></span></label>
                    <Input type=text id="username" name="username" value="15295993728"
                           autofocus autocomplete="off" placeholder="邮箱/手机号">
                    <span class="warn" style="display: none;" id="username_info"></span>
                </div>
                <div class="loginPaw">
                    <label for="password" class="login_paw"><span></span></label>
                    <Input type=password id="password" name="password" value="123456"
                           autocomplete="off" placeholder="密码">
                    <span class="warn" style="display: none;" id="password_info"></span>
                </div>
                <script>
                    $(function () {
                        $(".loginName").click(function () {
                            $(".loginPaw").removeClass("focus");
                            $(this).addClass("focus");
                        });
                        $(".loginPaw").click(function () {
                            $(".loginName").removeClass("focus");
                            $(this).addClass("focus");
                        });
                        $("#username").blur(function () {
                            var pattEmail = /^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/;
                            var pattPhone = /^[0-9]{11}$/;
                            var username = $(this).val();
                            if (!(pattEmail.test(username) || pattPhone.test(username))) {
                                $("#username_info").css({
                                    display: 'inline',
                                    color: 'red'
                                }).text('输入正确的账号')
                            } else {
                                $("#username_info").css({
                                    display: 'none'
                                });
                            }
                        });
                        $("#password").blur(function () {
                            var password = $(this).val();
                            var pattPassword = /^[a-z0-9_-]{6,18}$/;
                            if (!(pattPassword.test(password))) {
                                $("#password_info").css({
                                    display: 'inline',
                                    color: 'red'
                                }).text('输入6-18位字符数字下划线密码')
                            } else {
                                $("#password_info").css({
                                    display: 'none'
                                });
                            }
                        });
                    });
                </script>
                <!-- 忘记登陆密码 -->
                <div class="login_links clear">
                    <a class="fl" href=""><span class="tipS">忘记登陆密码？</span></a>
                    <script type="text/javascript">
                        $(".tipS").click(function () {
                            alert("您的注册名是：桂林理工大学  " + "  您的密码是：123456");
                        });
                        $("a[class='fl']").click(function (event) {
                            event.preventDefault()
                        })
                    </script>
                    <a class="fr" href="/agricultural/register"> <span>免费注册</span></a>
                </div>
                <!-- /忘记登陆密码 -->
                <input type=submit name="g" value="登录">
            </form>

            <script type="text/javascript">
                $(function () {
                    $("input[type=submit]").click(function (event) {
                        event.preventDefault();
                        var data = $("#submitData").serialize();
                        $.ajax({
                            url: '/agricultural/loginInfo',
                            type: 'POST',
                            data,
                            success(reData) {
                                if (reData.code == 200) {
                                    location.href = 'http://localhost:8080/agricultural/index'
                                } else if (reData.code == 300) {
                                    alert(reData.message)
                                }
                            }
                        });
                    })
                })
            </script>
            <div class="backcontent ">
                <p>合作网站账号登陆
                    <span class="cor7 padl15">
                    <!--<html:getProperty name="loginBean" property="backNews"/>-->
                    </span></p>
                <p class="login_partners clear">
                    <a class="sina" href=""></a>
                    <a class="qq" href=""></a>
                    <a class="alipay" href=""></a>
                    <a class="weixin" href=""></a>
                    <a class="lefen" href=""></a>

                </p>
                <p class="link_text">
                    <a href=""><span>QQ</span></a>
                    <a href=""><span>新浪微博</span></a>
                    <a href=""><span>微信账号</span></a>
                    <a href=""><span>豆瓣账号</span></a>
                    <a href=""><span>人人</span></a>
                    <a href=""><span>搜狐</span></a>
                    <a href=""><span>网易邮箱</span></a>
                    <!-- <html:getProperty name="loginBean" property="logname"/>-->
                    </span></span>
                </p>

            </div>
        </div>
    </div>
    <!-- footer -->
    <div id="footer" class="clear">
        <p class="padt10 textc cor2 lh20">
            <a class="disin padlr10" href="" target="_blank">便民购在线</a>
            <a class="disin padlr10" href="" target="_blank">当当网</a>
            <a class="disin padlr10" href="" target="_blank">亚马逊</a>
            <span class="dinin padlr20">|</span>
            <a class="disin padlr10" href="">微博微信</a>
            <a class="disin padlr10" href="">天猫旗舰店</a>
            <a class="disin padlr10" href="" target="_blank">极客学院</a>
            <a class="disin padlr10" href="" target="_blank">桂林理工大学</a>
            <a class="disin padlr10" href="" target="_blank">电子商务</a>
        </p>
    </div>
    <!-- /footer -->
</div>

</body>

</html>
